import request from "@/utils/request/request.js";
import utils from "@/utils/utils.js";
import token from "@/utils/token";

let appConfig = () => {
  // 将 utils 封装的方法挂载全局
  if (Object.keys(utils).length > 0) {
    for (let key in utils) {
      uni["$_" + key] = utils[key];
    }
  }
  // 将 request 工具方法挂载全局
  if (Object.keys(request).length > 0) {
    for (let key in request) {
      uni["$_" + key] = request[key];
    }
  }
  // 将 token 工具方法挂载全局
  if (Object.keys(token).length > 0) {
    for (let key in token) {
      uni["$_" + key] = token[key];
    }
  }
}
export default appConfig

